/*
 * Copyright (c) 2011 Jean-Marc Perronne
 * Ensisa, 12 rue des Freres Lumieres, F-68093 Mulhouse cedex
 * All rights reserved.
 *
 * The copyright of this software is owned by Werner Randelshofer. 
 * You may not use, copy or modify this software, except in  
 * accordance with the license agreement you entered into with  
 * Jean-Marc Perronne. For details see accompanying license terms. 
 */

package fr.uha.ensisa.jmp.connexion_3d;

@SuppressWarnings("serial")
public class Mouse3DException extends Exception
{
	public enum What{
		badMouseId, opeFailed, jniFailed, success, deviceDisconnected
	};
	
	public enum When{
		onOpen, onClose, onRead, onLedOn, onLedOff, onButtonsNbr, onUsage, onIsOverlapped, onManufacturerString, onProductString
	};
	
	private What what;
	private When when;
	private int productId;
	
	public Mouse3DException(int productId, When when, What what)
	{
		super("product : " +Integer.toHexString(productId) + " " + when + "->" + what);
		this.what = what;
		this.when = when;
		this.productId = productId;
	}
	
	public What what()
	{
		return this.what;
	}
	
	public When when()
	{
		return this.when;
	}
	
	public int productId()
	{
		return this.productId;
	}
}
